<cfset messages = request.smtpServer.getMessagesAsStruct() />
{ 
	identifier: 'id',
	label: 'label',
	items: [
		// Flat list of messages (each message lists it's folder)
<cfoutput>
<cfloop from="1" to="#arrayLen(messages)#" index="m">
	<cfset content = replacenocase(messages[m]["content"],'"',"\""","all")>
	<cfset content = replacenocase(content,chr(13)&chr(10),"","all")>
		{ type: 'message', id: '#m##messages[m]["messageID"]#', folder: 'inbox', label: "#messages[m]["subject"]#", sender: "#messages[m]["sender"]#", 
		receiver:"#messages[m]["receiver"]#",recipients:"#arrayToList(messages[m]["recipients"])#",sent: "#dateformat(messages[m]["sent"],"yyyy-mm-dd")#T#timeformat(messages[m]["sent"],"HH:mm:ss")#",
			text: "#replace(tostring(content),"=09","<br />","all")#" },  
</cfloop>
</cfoutput>
		{ type: 'message', id: 'node1.3', folder: 'inbox', label: "Hey, look!", sender: "Carrey Crown", receiver:"you@wee.hoo",recipients:"den@somewhere.com", sent: "2005-12-17", text:
				"This is our new simple mail app. What do you think? <br><br>You can navigate around this demo with arrows and tabs ... <br><br>Regards,<br>Carrey"
		}
	]
}
